package main

import "fmt"

func main() {
	a, b := 1, 2
	fmt.Println(getSum(a, b))
}

//#link: https://leetcode-cn.com/problems/sum-of-two-integers/
func getSum(a int, b int) int {
	for b != 0 {
		carry := (a & b) << 1
		a ^= b
		b = int(carry)
	}
	return a
}
